---
layout: m1x_soap
title: Assigned Products
---

<h2><a name="catalog_category.assignedProducts-Module%3AMageCatalog"></a>Module: Mage_Catalog</h2>

<p>The Mage_Catalog module allows you to manage categories and products.</p>

<h4><a name="catalog_category.assignedProducts-ResourceName%3Acatalogcategory"></a>Resource Name: catalog_category</h4>

<p><b>Aliases:</b></p>
<ul>
	<li>category</li>
</ul>


<h5><a name="catalog_category.assignedProducts-Method%3A"></a>Method:</h5>

<ul>
	<li>catalog_category.assignedProducts (SOAP V1)</li>
	<li>catalogCategoryAssignedProducts (SOAP V2)</li>
</ul>


<p>Retrieve the list of products assigned to a required category.</p>

<p><b>Aliases:</b></p>
<ul>
	<li>category.assignedProducts</li>
</ul>



<p><b>Arguments:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> sessionId </td>
<td> Session ID </td>
</tr>
<tr>
<td> int </td>
<td> categoryId </td>
<td> ID of the required category </td>
</tr>
</tbody></table>


<p><b>Returns</b>:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> array </td>
<td> result </td>
<td> Array of catalogAssignedProduct </td>
</tr>
</tbody></table>


<p>The <b>catalogAssignedProduct</b> content is as follows:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> int </td>
<td> product_id </td>
<td> ID of the assigned product </td>
</tr>
<tr>
<td> string </td>
<td> type </td>
<td> Product type </td>
</tr>
<tr>
<td> int </td>
<td> set </td>
<td> Attribute set ID </td>
</tr>
<tr>
<td> string </td>
<td> sku </td>
<td> Product SKU </td>
</tr>
<tr>
<td> int </td>
<td> position </td>
<td> Position of the assigned product </td>
</tr>
</tbody></table>


<h4><a name="catalog_category.assignedProducts-Examples"></a>Examples</h4>

<h5><a name="catalog_category.assignedProducts-RequestExampleSOAPV1"></a>Request Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$client = new SoapClient('http://magentohost/api/soap/?wsdl');

// If somestuff requires api authentification,
// then get a session token
$session = $client-&gt;login('apiUser', 'apiKey');

$result = $client-&gt;call($session, 'catalog_category.assignedProducts', '4');
var_dump($result);

// If you don't need the session anymore
//$client-&gt;endSession($session);</pre>
		</div>
</div></div>

<h5><a name="catalog_category.assignedProducts-RequestExampleSOAPV2"></a>Request Example SOAP V2</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy-&gt;login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy-&gt;catalogCategoryAssignedProducts($sessionId, '4');
var_dump($result);</pre>
		</div>
</div></div>

<h5><a name="catalog_category.assignedProducts-RequestExampleSOAPV2%28WSIComplianceMode%29"></a>Request Example SOAP V2 (WS-I Compliance Mode)</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl');

$sessionId = $proxy-&gt;login((object)array('username' =&gt; 'apiUser', 'apiKey' =&gt; 'apiKey'));

$result = $proxy-&gt;catalogCategoryAssignedProducts((object)array('sessionId' =&gt; $sessionId-&gt;result, 'categoryId' =&gt; '4'));
var_dump($result-&gt;result);</pre>
		</div>
</div></div>

<h5><a name="catalog_category.assignedProducts-ResponseExampleSOAPV1"></a>Response Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">array
  0 =&gt;
    array
      'product_id' =&gt; string '1' (length=1)
      'type' =&gt; string 'simple' (length=6)
      'set' =&gt; string '4' (length=1)
      'sku' =&gt; string 'n2610' (length=5)
      'position' =&gt; string '1' (length=1)
  1 =&gt;
    array
      'product_id' =&gt; string '2' (length=1)
      'type' =&gt; string 'simple' (length=6)
      'set' =&gt; string '4' (length=1)
      'sku' =&gt; string 'b8100' (length=5)
      'position' =&gt; string '1' (length=1)</pre>
		</div>
</div></div>

<?php include(__ROOT__ . 'footer.php'); ?>
